package com.ztgf.commodity.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.ztgf.commodity.models.bo.AttributesQueryBO;
import com.ztgf.commodity.models.dto.CommoditySpecificationAttrDTO;
import com.ztgf.commodity.models.dto.CommoditySpecificationDTO;
import com.ztgf.commodity.models.vo.CommoditySpecificationVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * author: chenyu.wang
 * date: 2020-05-26 14:23
 * Description:商品规格
 */
@Mapper
public interface CommoditySpecificationMapper extends BaseMapper<CommoditySpecificationDTO> {


    /**
     * description: 查询规格属性列表
     * param: [page, bo]
     * author: chenyu.wang
     * date: 2020-07-09
     * return: java.util.List<com.ztgf.commodity.models.vo.CommoditySpecificationVO>
     */
    List<CommoditySpecificationVO> queryPageList(Page<CommoditySpecificationVO> page, @Param("item") AttributesQueryBO bo);

    /**
     * description: 根据规格表id获取属性值
     * param: [id]
     * author: chenyu.wang
     * date: 2020-07-09
     * return: java.util.List<com.ztgf.commodity.models.dto.CommoditySpecificationAttrDTO>
     */
    List<CommoditySpecificationAttrDTO> getBySpecId(@Param("id") Long id);

    /**
     * description:  查询规格属性详情
     * param: [id]
     * author: chenyu.wang
     * date: 2020-07-09
     * return: com.ztgf.commodity.models.vo.CommoditySpecificationVO
     */
    CommoditySpecificationVO getById(@Param("id") Long id);
}
